@import '../styles/common/baseColors.less';

// 按钮样式函数封装
.button-variant(@color; @background; @border; @color-hover; @background-hover; @border-hover; @color-active; @background-active; @border-active; @color-disabled; @background-disabled; @border-disabled; @box-shadow) {
  color: @color;
  background-color: @background;
  border-color: @border;
  box-shadow: @box-shadow;

  &:hover {
    color: @color-hover;
    background-color: @background-hover;
    border-color: @border-hover;
  }
  &:focus,
  &.focus {
    color: @color-active;
    background-color: @background-active;
    border-color: @border-active;
    box-shadow: @box-shadow;
  }
  &:active,
  &.active {
    color: @color-active;
    background-color: @background-active;
    border-color: @border-active;
    &:hover,
    &:focus,
    &.focus {
      color: @color-active;
      background-color: @background-active;
      border-color: @border-active;
    }
    box-shadow: @box-shadow;
  }

  &.disabled,
  &[disabled],
  fieldset[disabled] & {
    &,
    &:hover,
    &:focus,
    &.focus,
    &:active,
    &.active {
      color: @color-disabled;
      background-color: @background-disabled;
      border-color: @border-disabled;
    }
  }
}
